//给字符串 去除空格
function Trim(str, is_global) {
	var result;
	result = str.replace(/(^\s+)|(\s+$)/g, "");
	if (is_global.toLowerCase() == "g") {
		result = result.replace(/\s/g, "");
	}
	return result;
}

function filterStr(str) {
	var pattern = new RegExp(
			"[`~!@#$^&*()=|{}':;',\\[\\].<>/?~！@#￥……&*（）——|{}【】‘；：”“'。，、？%+_]");
	var specialStr = "";
	for (var i = 0; i < str.length; i++) {
		specialStr += str.substr(i, 1).replace(pattern, '');
	}
	return specialStr;
}

function updateString(data) {
	data = data.replace(/&/g, "\",\"");
	data = data.replace(/=/g, "\":\"");
	data = data.replace("\"", "")
	data = "{\"" + data + "\"}";
	filterStr(data);
	return data;
}